package com.lyn.tencent_health_code.entity;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author almost
 */
@ApiModel("注册用户")
public class RegisteredUser {
    @ApiModelProperty(name = "invitationCode", value = "邀请码")
    private String invitationCode;
    @ApiModelProperty(name = "userName", value = "用户名")
    private String userName;
    @ApiModelProperty(name = "userPassword", value = "用户密码")
    private String userPassword;
    @ApiModelProperty(name = "confirmPassword", value = "确认密码")
    private String confirmPassword;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public RegisteredUser() {
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public String getInvitationCode() {
        return this.invitationCode;
    }

    @SuppressWarnings("all")
    public String getUserName() {
        return this.userName;
    }

    @SuppressWarnings("all")
    public String getUserPassword() {
        return this.userPassword;
    }

    @SuppressWarnings("all")
    public String getConfirmPassword() {
        return this.confirmPassword;
    }

    @SuppressWarnings("all")
    public void setInvitationCode(final String invitationCode) {
        this.invitationCode = invitationCode;
    }

    @SuppressWarnings("all")
    public void setUserName(final String userName) {
        this.userName = userName;
    }

    @SuppressWarnings("all")
    public void setUserPassword(final String userPassword) {
        this.userPassword = userPassword;
    }

    @SuppressWarnings("all")
    public void setConfirmPassword(final String confirmPassword) {
        this.confirmPassword = confirmPassword;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof RegisteredUser)) return false;
        final RegisteredUser other = (RegisteredUser) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$invitationCode = this.getInvitationCode();
        final Object other$invitationCode = other.getInvitationCode();
        if (this$invitationCode == null ? other$invitationCode != null : !this$invitationCode.equals(other$invitationCode)) return false;
        final Object this$userName = this.getUserName();
        final Object other$userName = other.getUserName();
        if (this$userName == null ? other$userName != null : !this$userName.equals(other$userName)) return false;
        final Object this$userPassword = this.getUserPassword();
        final Object other$userPassword = other.getUserPassword();
        if (this$userPassword == null ? other$userPassword != null : !this$userPassword.equals(other$userPassword)) return false;
        final Object this$confirmPassword = this.getConfirmPassword();
        final Object other$confirmPassword = other.getConfirmPassword();
        if (this$confirmPassword == null ? other$confirmPassword != null : !this$confirmPassword.equals(other$confirmPassword)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof RegisteredUser;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $invitationCode = this.getInvitationCode();
        result = result * PRIME + ($invitationCode == null ? 43 : $invitationCode.hashCode());
        final Object $userName = this.getUserName();
        result = result * PRIME + ($userName == null ? 43 : $userName.hashCode());
        final Object $userPassword = this.getUserPassword();
        result = result * PRIME + ($userPassword == null ? 43 : $userPassword.hashCode());
        final Object $confirmPassword = this.getConfirmPassword();
        result = result * PRIME + ($confirmPassword == null ? 43 : $confirmPassword.hashCode());
        return result;
    }
    //</editor-fold>
}
